<?php

namespace app\link\validate;

use think\Validate;

class Index extends Validate {

    /**
     * 规则定义
     * @var array
     */
    protected $rule = [
        'keyword'  => 'require|length:1,12',
        'password' => 'require|length:4,32',
    ];

    /**
     * 提示信息定义
     * @var array
     */
    protected $message = [
        'keyword'  => '短链确少1-12关键词',
        'password' => '请输入4-32位短链接密码',
    ];

    /**
     * 场景定义
     * @var array
     */
    public $scene = [
        'redirect' => ['keyword'],
        'checkPassword' => ['keyword', 'password'],
    ];
}